package com.woniu.command.handler;

import com.woniu.adapter.UserAdapter;
import com.woniu.outlet.po.UserPo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class UserCommandHandler {

    @Autowired
    private UserAdapter userAdapter;



    public Integer addUser(UserPo userPo){
        userAdapter.addUser(userPo);
        return 1;
    }

    public Integer updateUser(UserPo userPo){
        userAdapter.updateUser(userPo);
        return 1;
    }

    public Integer deleteUserById(Integer id){
        userAdapter.deleteUserById(id);
        return 1;
    }

}
